#include <iostream>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <algorithm>
using namespace std;
vector<int> generateRandomArray(int maxsize, int minvalue, int maxvalue) {
    vector<int> arr(maxsize);
    for(int i = 0; i < maxsize; i++) {
        arr[i] = rand() % (maxvalue - minvalue + 1) + minvalue; 
    }
    return arr;
}
bool isEqual(vector<int>& a, vector<int> b) {
    if(a.size() != b.size()) {
        return false;
    }
    for(size_t i = 0; i < a.size(); i++) {
        if(a[i] != b[i]) {
            return false;
        }
    }
    return true;
}
void myswap(vector<int>& arr, int i, int j) {
    int temp = arr[i];
    arr[i] = arr[j];
    arr[j] = temp;
}
void BubbleSort(vector<int>& arr) {
    if(arr.size() < 2) {
        return;
    }
    for(int i = arr.size() - 1; i > 0; i--) {
        for(int j = 0; j < i; j++) {
            if(arr[j] > arr[j + 1]) {
                myswap(arr, j, j + 1);
            }
        }
    }
}
int main() 
{
    srand(static_cast<unsigned>(time(0)));
    int maxsize = 10000;
    int minvalue = 1;
    int maxvalue = 5000;
    vector<int> arr1 = generateRandomArray(maxsize, minvalue, maxvalue);
    vector<int> arr2 = arr1;
    BubbleSort(arr1);
    sort(arr2.begin(), arr2.end());
    if(isEqual(arr1, arr2)) {
        cout << "Nice" << endl;
    } else {
        cout << "Fucking fucked" << endl;
    }
    return 0;
}